﻿#include "HuffmanCompress.hpp"
#include "LZ77.hpp"
#include "GZip.hpp"

int main() {
	int key;
	HuffmanCompress hf;
	GZip hz;
	LZ77 lz;
	//选择接下来要进行的操作
	while (1) {
		cout << "选择接下来要进行的操作" << endl;
		cout << "0->退出" << endl;
		cout << "1->huffmanCompress" << endl;
		cout << "2->huffmanDeCompress" << endl;
		cout << "3->LZ77Compress" << endl;
		cout << "4->LZ77DeCompress" << endl;
		cout << "5->GZipCompress" << endl;
		cout << "6->GZipDeCompress" << endl;
		cout << endl;
		cin >> key;
		switch (key)
		{
		case 0:
			exit(0);
		case 1:
			hf.CompressFile("111.txt");
			break;
		case 2:
			hf.DeCmpressFile("111.huffman");
			break;
		case 3:
			lz.CompressFile("111.txt");
			break;
		case 4:
			lz.DeCompressFile("111.lz77");
			break;
		case 5:
			hz.deflate("111.txt");
			break;
		case 6:
			hz.inflate("111.gzip");
			break;
		default:
			break;
		}
	}
	return 0;
}